// 用户角色枚举
export enum UserRole {
  PARENT = 'PARENT',
  TEACHER = 'TEACHER',
  ADMIN = 'ADMIN',
}

// 基础用户类型
export interface User {
  id: string;
  username: string;
  role: UserRole;
  name: string;
  avatar?: string;
  email: string;
  phone: string;
  createdAt: Date;
  updatedAt: Date;
}

// 学生类型
export interface Student {
  id: string;
  name: string;
  avatar?: string;
  classId: string;
  parentId: string;
  createdAt: Date;
  updatedAt: Date;
}

// 考勤状态枚举
export enum AttendanceStatus {
  PRESENT = 'PRESENT',
  ABSENT = 'ABSENT',
  LATE = 'LATE',
  LEAVE = 'LEAVE',
}

// 考勤记录类型
export interface Attendance {
  id: string;
  studentId: string;
  date: Date;
  status: AttendanceStatus;
  remark?: string;
  createdBy: string;
  createdAt: Date;
  updatedAt: Date;
}

// 成绩类型
export interface Grade {
  id: string;
  studentId: string;
  subject: string;
  score: number;
  examType: string;
  examDate: Date;
  remark?: string;
  createdBy: string;
  createdAt: Date;
  updatedAt: Date;
}

// 作业类型
export interface Homework {
  id: string;
  classId: string;
  subject: string;
  title: string;
  content: string;
  deadline: Date;
  attachments?: string[];
  createdBy: string;
  createdAt: Date;
  updatedAt: Date;
}

// 奖惩记录类型
export interface Award {
  id: string;
  studentId: string;
  type: 'AWARD' | 'PUNISHMENT';
  title: string;
  description: string;
  date: Date;
  createdBy: string;
  createdAt: Date;
  updatedAt: Date;
}

// 评语类型
export interface Comment {
  id: string;
  studentId: string;
  content: string;
  type: 'ACADEMIC' | 'BEHAVIOR' | 'OTHER';
  createdBy: string;
  createdAt: Date;
  updatedAt: Date;
}

// 留言类型
export interface Message {
  id: string;
  fromId: string;
  toId: string;
  content: string;
  read: boolean;
  createdAt: Date;
  updatedAt: Date;
}

// 通知类型
export interface Notice {
  id: string;
  title: string;
  content: string;
  type: 'CLASS' | 'SCHOOL';
  targetId?: string; // 班级ID或学校ID
  attachments?: string[];
  createdBy: string;
  createdAt: Date;
  updatedAt: Date;
}

// 班级类型
export interface Class {
  id: string;
  name: string;
  grade: string;
  teacherId: string;
  createdAt: Date;
  updatedAt: Date;
}

// API 响应类型
export interface ApiResponse<T> {
  code: number;
  message: string;
  data: T;
} 